#!/usr/bin/python3
# -*- coding: utf-8 -*-

import numpy  as np
import pandas as pd
import talib as ta

eps = 1e-8

def signal(*args):
    # Roc 指标
    df = args[0]
    n  = args[1]
    factor_name = args[2]

    df[factor_name] = df['close'] / df['close'].shift(n) - 1

    return df
